package com.atguigu.demo.mapper;

import com.atguigu.demo.entity.Tiger;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TigerMapper {
    List<Tiger> selectByCondition(Tiger condition);

    void updateByCondition(Tiger tiger);

//trim标签
    List<Tiger> selectByConditionTrim(Tiger condition);
//choose/when/otherwise标签
    List<Tiger> selectByConditionChoose(Tiger condition);
//foreach标签   使用该标签 ：批量插入
    int insertTigerList(List<Tiger> tigerList);
//foreach标签 使用该标签 ：批量更新、删除
    void updateByList(@Param("tigerList000") List<Tiger> tigerList);
//测试一级缓存
    Tiger selectById(int tigerId);
//测试分页插件
    List<Tiger> selectAll();
}
